home *** CD-ROM | disk | FTP | other *** search
- /* Listing 3. */
- /* Test program for BIOS Fonts */
-
- #include<stdio.h>
- #include<dos.h>
- #include<stdlib.h>
- #include<string.h>
- #include<bfont.h>
-
-
- void main(int argc, char *argv[])
- {
- struct REGPACK Regs;
- int x, y;
-
- Regs.r_ax = 0x0012;
- intr(0x10, &Regs);
-
- SetBFonts();
- for(x = 1; x < 100; x += 2)
- EGABlock(0, x, 100, 1, 4);
- getch();
- for(x = 0, y = 0; y < 100; ++x, y += 4)
- {
- SetBFColor(0, x);
- PrintBF(x, y, "This is a test!!!");
- }
- getch();
- SetBFColor(0, 10);
- PrintBF(10, 120, "ROM 8x8 Font");
- SetBFColor(BF8x14, 9);
- SetBFFont(BF8x14);
- PrintBF(10, 130, "ROM 8x14 Font");
- SetBFColor(BF8x16, 13);
- SetBFFont(BF8x16);
- PrintBF(10, 150, "ROM 8x16 Font");
- getch();
- Regs.r_ax = 0x0001;
- intr(0x10, &Regs);
- }
-